#include <iostream>
using namespace std;
#include "UdpServer.hpp"
#include <memory>


void Usage(char* proc)
{
    cout << "Usage:\n\t" << proc << "  local_ip  local_port\n" << endl;
}

int main(int argc, char* argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }

    string local_ip = argv[1];
    uint16_t local_port = stoi(argv[2]);

    unique_ptr<UdpServer> usvr = make_unique<UdpServer>(local_port, local_ip);
    usvr->InitServer();
    usvr->Start();

    return 0;
}